import request from '@/utils/request'

//  分页查询任务信息
export function handlePageList(query) {
  return request({
    url: '/api/admin/task/jobInfo/page',
    method: 'post',
    data: query
  })
}

//  保存任务信息
export function handleSave(data) {
  return request({
    url: '/api/admin/task/jobInfo/save',
    method: 'post',
    data: data
  })
}

//  删除任务信息
export function handleDelete(data) {
  return request({
    url: '/api/admin/task/jobInfo/delete',
    method: 'post',
    params: data
  })
}

//  暂停任务
export function handlePause(data) {
  return request({
    url: '/api/admin/task/jobInfo/pause',
    method: 'post',
    params: data
  })
}

//  恢复任务
export function handleResume(data) {
  return request({
    url: '/api/admin/task/jobInfo/resume',
    method: 'post',
    params: data
  })
}

//  启动任务
export function handleStart(data) {
  return request({
    url: '/api/admin/task/jobInfo/start',
    method: 'post',
    params: data
  })
}

//  停止任务
export function handleStop(data) {
  return request({
    url: '/api/admin/task/jobInfo/stop',
    method: 'post',
    params: data
  })
}

//  触发任务
export function handleTrigger(data) {
  return request({
    url: '/api/admin/task/jobInfo/trigger',
    method: 'post',
    params: data
  })
}

//  补偿任务
export function handleResolve(data) {
  return request({
    url: '/api/admin/task/jobInfo/resolve',
    method: 'post',
    params: data
  })
}
